package com;

import com.filter.LoggingFilter;
import com.filter.LoginFilter;
import org.mybatis.spring.annotation.MapperScan;
import org.mybatis.spring.annotation.MapperScans;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;


@SpringBootApplication
@MapperScan("com.mapper")
public class BooksApplication {

    public static void main(String[] args) {
        SpringApplication.run(BooksApplication.class, args);
    }
//    @Bean
//    public FilterRegistrationBean<LoginFilter> loginFilterRegistration() {
//        FilterRegistrationBean<LoginFilter> registration = new FilterRegistrationBean<>();
//        registration.setFilter(new LoginFilter());
//        registration.addUrlPatterns("/*");
//        return registration;
//    }
//
//    @Bean
//    public FilterRegistrationBean<LoggingFilter> loggingFilterRegistration() {
//        FilterRegistrationBean<LoggingFilter> registration = new FilterRegistrationBean<>();
//        registration.setFilter(new LoggingFilter());
//        registration.addUrlPatterns("/*");
//        return registration;
//    }
}
